package com.ytf.test.eighth;

/**
 * @author: YTF
 * @date: 2025/1/3 15:26
 * @version: 1.0
 * @description:
 */
public class Shapes {
    private static RandomShapeGenerator randomShapeGenerator = new RandomShapeGenerator();

    public static void main(String[] args) {
        Shape[] shapes = new Shape[9];
        for (int i = 0; i < 9; i++) {
            shapes[i] = randomShapeGenerator.next();
        }
        for (Shape shape : shapes) {
            shape.draw();
            shape.use();
        }
        /**
         * Output:
         * Triangle.draw()
         * Triangle.draw()
         * Square.draw()
         * Triangle.draw()
         * Square.draw()
         * Triangle.draw()
         * Square.draw()
         * Triangle.draw()
         * Circle.draw()
         */
    }
}
